package what.basic.textcomponent;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.net.*;
import java.io.*;
public class Jeditorpanehtml {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		JEditorPane jep=null;
		try{
			URL ad=new URL("http://www.google.com");
			jep=new JEditorPane(ad);
		}
		catch(MalformedURLException e){
			System.out.println("Malformed URL:"+e);
		}
		catch(IOException e){
			System.out.println("IOException"+e);
		}
		jep.setEditable(true);
		JFrame f=new JFrame("html test");
		f.setContentPane(new JScrollPane(jep));
		f.setSize(200,250);
		f.setVisible(true);
		f.addWindowListener(new WindowAdapter(){
			public void windowClosing(WindowEvent e){
				System.exit(0);
			}
		});

	}

}
